Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve health checker for adapting coordinator #1032

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

rambohe-ch
Copy link
Member

@rambohe-ch rambohe-ch commented Oct 21, 2022

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage

/kind feature

What this PR does / why we need it:

In order to check the healthy status of pool-coordinator component in the NodePool, the HealthChecker module is need to improved to adapt two kinds backends. so several Interfaces have been added:

  • HealthChecker: health checker for pool-coordinator component
  • MultipleBackendsHealthChecker: health checker for kube-apiservers on cloud
  • BackendProber: used for sending heartbeat to backend.

btw: the detail info about pool coordinator, please dive into the following proposals:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


other Note

@openyurt-bot
Copy link
Collaborator

@rambohe-ch: GitHub didn't allow me to assign the following users: your_reviewer.

Note that only openyurtio members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage

/kind feature

What this PR does / why we need it:

In order to check the healthy status of pool-coordinator component in the NodePool, the HealthChecker module is need to improved to adapt two kinds backends. so several Interfaces have been added:

  • HealthChecker: health checker for pool-coordinator component
  • MultipleBackendsHealthChecker: health checker for kube-apiservers on cloud
  • BackendProber: used for sending heartbeat to backend.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


other Note

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rambohe-ch
Copy link
Member Author

@codecov
Copy link

codecov bot commented Oct 21, 2022

Codecov Report

Merging #1032 (4db7624) into master (2a67506) will increase coverage by 0.81%.
The diff coverage is 86.82%.

@@            Coverage Diff             @@
##           master    #1032      +/-   ##
==========================================
+ Coverage   48.15%   48.96%   +0.81%     
==========================================
  Files          95       96       +1     
  Lines       13010    13053      +43     
==========================================
+ Hits         6265     6392     +127     
+ Misses       6209     6130      -79     
+ Partials      536      531       -5     
Flag Coverage Δ
unittests 48.96% <86.82%> (+0.81%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/yurthub/healthchecker/fake_checker.go 0.00% <0.00%> (ø)
pkg/yurthub/healthchecker/node_lease.go 91.00% <ø> (+19.00%) ⬆️
pkg/yurthub/proxy/remote/loadbalancer.go 46.15% <40.00%> (+6.15%) ⬆️
pkg/yurthub/healthchecker/health_checker.go 85.95% <87.50%> (+33.56%) ⬆️
pkg/yurthub/healthchecker/prober.go 96.34% <96.34%> (ø)
pkg/yurthub/kubernetes/rest/config.go 61.53% <100.00%> (ø)
pkg/yurthub/proxy/remote/remote.go 1.35% <100.00%> (+<0.01%) ⬆️
pkg/util/iptables/iptables.go 87.67% <0.00%> (+0.54%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@gnunu gnunu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/LGTM

@openyurt-bot
Copy link
Collaborator

@gnunu: changing LGTM is restricted to collaborators

In response to this:

/LGTM

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gnunu, rambohe-ch

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

pkg/yurthub/healthchecker/health_checker.go Show resolved Hide resolved
pkg/yurthub/healthchecker/interfaces.go Outdated Show resolved Hide resolved
pkg/yurthub/healthchecker/prober.go Outdated Show resolved Hide resolved
Copy link
Member

@Congrool Congrool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants